package com.service.imp;

import com.mapper.UserMapper;
import com.pojo.User;
import com.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author czy@win10
 * @date 2019/9/19 22:45
 */
@Service("userService")
@Transactional
public class UserServiceImpl implements UserService {

	//注入
	@Autowired
	private UserMapper userMapper;

	//账号密码查询
	@Override
	public User findUser(String usercode, String password) {
		User user = this.userMapper.findUser(usercode, password);

		return user;
	}

	@Override
	public int createUser(User user) {
		return this.userMapper.createUser(user);
	}
}
